package com.hsgene.user.dto.login;

import com.hsgene.common.util.validation.FieldChecker;

import java.io.Serializable;

/**
 * 微信登录信息DTO
 *
 * @author wangbing
 * @version 1.0, 2018/10/16
 */
public class WeChatBindingRequestDto implements Serializable {

    /**
     * 昵称
     */
    private String nick;

    /**
     * 微信头像地址
     */
    private String avatar;

    /**
     * 用户性别（2-代表男性  1-代表女性）
     */
    private Integer gender;

    /**
     * 电话号码（从微信获取的密文串）
     */
    private String phone;

    /**
     * 偏移量
     */
    private String iv;

    /**
     * 微信用户第一次授权登录时调接口返回的bindingKey
     */
    private String bindingKey;

    public void check() {
        FieldChecker.checkEmpty(bindingKey, "bindiingKey");
        FieldChecker.checkEmpty(phone, "电话号码");
    }

    public String getNick() {
        return nick;
    }

    public void setNick(String nick) {
        this.nick = nick;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public String getAvatar() {
        return avatar;
    }

    public void setAvatar(String avatar) {
        this.avatar = avatar;
    }

    public Integer getGender() {
        return gender;
    }

    public void setGender(Integer gender) {
        this.gender = gender;
    }

    public String getBindingKey() {
        return bindingKey;
    }

    public void setBindingKey(String bindingKey) {
        this.bindingKey = bindingKey;
    }

    public String getIv() {
        return iv;
    }

    public void setIv(String iv) {
        this.iv = iv;
    }
}
